1. Field of the Invention
The present invention relates generally to data processing and, more specifically, to object-oriented programming systems and processes.
2. Description of the Related Art
An expert system emulates human reasoning within a collected knowledge base. A man-machine interface permits human users to interact with the expert system, so the users can provide data on external conditions and receive conclusions or suggested actions. An inference mechanism applies search strategies to compare the status of the conditions against the knowledge base to arrive at conclusions. In this way, expert systems permit otherwise unavailable knowledge to be applied to complex problems in a variety of situations. Expert systems are suitable for application to a wide variety of tasks, including farm operation, inventory control, medical diagnosis, and computer configuration management.
The knowledge base in a rule-based expert system comprises a set of if-then rules. If certain conditions are true, then particular actions are recommended or conclusions are reached. Checking the status of the conditions against the set of if-then rules is performed by the inference mechanism. Thus, the inference mechanism must recognize and understand the set of if-then rules. The set of if-then rules can become quite extensive to permit the needed search strategies necessary to emulate human reasoning. For example, an expert system used in diagnosing bacterial infections includes several hundred rules. Other expert systems are known to have thousands of rules.
The representation of a knowledge base in terms of if-then rules is an important part of the development of any expert system, but much effort also is expended in developing the inference mechanism, the user interface, and other expert system program support features. The inference mechanism generally comprises relatively complex computer programming that must be able to understand the if-then rules of the knowledge base. The user interface should permit updating and correcting of the conditions and the knowledge base. Testing and evaluating the expert system programming and ensuring smooth user interaction can be a laborious and time-consuming process.
Many expert systems are developed in an iterative fashion, where the knowledge base and the conditions against which it is applied are slowly expanded as system prototypes are developed, tested, and refined. For example, a restricted initial rule set might be constructed and applied to each set of applicable conditions as the expert system is validated for the rule set. Thus, many expert systems are tailored for each particular application, from the user interface to the knowledge base to the inference mechanism.
An expert system shell, comprising general program support features, can be a starting point for expert system development, but much customization still is necessary. The inference mechanism and knowledge base, for example, often must be developed in tandem. The development of expert systems would be easier, cheaper, and faster if the user interface could be more consistent, development of the knowledge base made easier, and application of the inference mechanism standardized. Unfortunately, there currently is no expert system development platform available that can quickly and efficiently guide development of expert systems.
From the discussion above, it should be apparent that there is a need for an expert system development mechanism tool that provides a basis for more rapid and easy development of rule-based expert systems. The present invention satisfies this need.
In accordance with the present invention, a reusable object oriented (OO) framework for use with object oriented programming systems comprises an expert system shell that applies a rule set developed by a framework user against a user-defined set of conditions and thereby provides a more readily developed rule-based expert system. The framework includes a condition manager object that keeps track of what conditions are true at any time. The conditions are a set of object oriented classes that are organized into an inheritance hierarchy for use by the condition manager. A detector determines when to change the status of the conditions between true and false. The set of rules are if-then rules that are received by the condition manager. When a condition state is changed, the condition manager realizes that one or more rules might indicate a particular action might now be appropriate. Therefore, the condition manager checks the rules against the conditions. Different actions are called for depending on the outcome of the rule-condition checking. In this way, a single user interface can be used for multiple expert systems. Development of the knowledge base is made easier because the if-then rules need only be written so they can be recognized and interpreted by the condition manager class of the object oriented program. Thus, a standard inference mechanism is provided. Thus, expert systems can be developed more quickly and efficiently.
The expert system developer provides the set of rules and conditions appropriate for the knowledge base of the expert system under development. The framework provides the expert system shell comprising the condition manager, detector, and a rules compiler that processes the if-then rules so they can be used by the condition manager. In this way, an expert system developer can more quickly integrate a set of rules with an inference mechanism and provide an operable expert system.
In one aspect of the invention, the detector comprises a human operator who uses a man-machine interface to change conditions as the changes occur. For example, the conditions can comprise keyboard input responses to a medical diagnosis query video menu. In another aspect of the invention, the detector in a computer language checking expert system comprises a computer language parsing processor that receives computer program statements and provides parsed language statements to the condition manager.
The condition manager and rules compiler comprise a condition management facility that are provided as core classes, unchangeable by the expert system developer. The set of rules and conditions comprise extensible object oriented classes that are customized by the expert system developer.
Other features and advantages of the present invention should be apparent from the following description of the preferred embodiment, which illustrates, by way of example, the principles of the invention.